/**
 * 定义一个手机类
 */
public class Phone {
    /**
     * 属性1最爱的手机
     */
    private String lovePhone;

    /**
     * 属性2最好用的手机
     */
    private String useFulPhone;

    /**
     * 属性3最贵的手机
     */
    private String exPensivePhone;

    /**
     * 定义一个方法给出最健康的水果和最爱吃的水果
     */
    public void usefulPensive() {
        //给人们最爱的手机赋值
        String lovePhone = "apple";
        //给最好用的手机赋值
        String useFulPhone = "huawei";
        System.out.println("人们最爱吃的水果是" + lovePhone + "；最健康的水果是" + useFulPhone);
    }

    /**
     * 定义一个方法查询最贵的手机
     */
    public void expensivePhone(){
        String exPensivePhone = "apple";
        System.out.println("最贵的手机是"+exPensivePhone);
    }
    /**
     *新建一个方法用main函数调用
     */
    public Phone(String lovePhone,String useFulPhone,String exPensivePhone){
        this.lovePhone = lovePhone;
        this.useFulPhone = useFulPhone;
        this.exPensivePhone = exPensivePhone;
    }
}
